/*
 * This file is part of Sparwe.
 *
 *  Sparwe is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Sparwe is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Sparwe.  If not, see <http://www.gnu.org/licenses/>.
 */ 


#ifndef __CONVERSIONPOLICIES_H__
#define __CONVERSIONPOLICIES_H__


#include "stringtoprimitives.h"

namespace sp_policies
{
	/** 
	 * @brief Conversion policy class for the policy pattern. 
	 */
	template <class T>class ConversionPolicy 
	{
		public:
			T Convert(std::string in) const;			
	};

	typedef StringToString<ConversionPolicy<std::string> > StringToStringPolicy;
	typedef StringToInt<ConversionPolicy<int> > StringToIntPolicy;
	typedef StringToFloat<ConversionPolicy<float> > StringToFloatPolicy;
	typedef StringToDouble<ConversionPolicy<double> > StringToDoublePolicy;
	typedef StringToBool<ConversionPolicy<bool> > StringToBoolPolicy;

}

#endif
